{
gtk_container_set_resize_mode (GTK_CONTAINER (widget), GTK_RESIZE_PARENT);
- gtk_widget_set_realized (widget, TRUE);
-
attributes.x = allocation.x;
attributes.y = allocation.y;
attributes.width = allocation.width;
&attributes, attributes_mask);
gtk_widget_set_window (widget, gdk_window);
gtk_widget_register_window (widget, gdk_window);
+ gtk_widget_set_realized (widget, TRUE);
return;
}
g_return_if_fail (!gtk_widget_get_realized (widget));
}
-
- gtk_widget_set_realized (widget, TRUE);
-
+
switch (priv->type)
{
case GTK_WINDOW_TOPLEVEL:
gdk_window = gdk_window_new (parent_window, &attributes, attributes_mask);
gtk_widget_set_window (widget, gdk_window);
gtk_widget_register_window (widget, gdk_window);
+ gtk_widget_set_realized (widget, TRUE);
/* We don't need to set a background on the GdkWindow; with decorations
* we draw the background ourself